package com.usian.hero.service.impl;

import com.usian.hero.entity.Hero;
import com.usian.hero.entity.HeroDto;
import com.usian.hero.mapper.HeroMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.usian.hero.service.IHeroService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2024-06-25
 */
@Slf4j
@Service
@Transactional
public class HeroServiceImpl extends ServiceImpl<HeroMapper, Hero> implements IHeroService {
@Autowired
private HeroMapper heroMapper;

    @Override
    public List<HeroDto> findAll(HeroDto dto) {
       List<HeroDto> list= heroMapper.findAll(dto);
       return list;
    }
}
